/* ****************************************************************************
 *
 * Copyright (c) Microsoft Corporation. 
 *
 * This source code is subject to terms and conditions of the Microsoft Public License. A 
 * copy of the license can be found in the License.html file at the root of this distribution. If 
 * you cannot locate the  Microsoft Public License, please send an email to 
 * dlr@microsoft.com. By using this source code in any fashion, you are agreeing to be bound 
 * by the terms of the Microsoft Public License.
 *
 * You must not remove this notice, or any other, from this software.
 *
 * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
 * KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
 * PARTICULAR PURPOSE.
 * ***************************************************************************/



#pragma once

class CPGLDemo : public CObject
{
DECLARE_DYNCREATE(CPGLDemo);
public:
	static void GetExampleHistogram1(CPGLRegionPtr pRegion, int n);
	static void  GetExampleErrorBar(CPGLRegionPtr pRegion);
	//! Static demo functions
	static void GetExampleHistogram(CPGLRegionPtr pRegion);
	static 	void GetExampleBar(CPGLRegionPtr pRegion);
	static 	void GetExampleDataHandling(CPGLRegionPtr pRegion);
	static 	void GetExampleMultipleAxis(CPGLRegionPtr pRegion);
	static 	void GetExampleMarkers(CPGLRegionPtr pRegion);
	static 	void GetExampleDifferentFills(CPGLRegionPtr pRegion);
	static 	void GetExampleVectorField(CPGLRegionPtr pRegion);
	static 	void GetExampleBitmap(CPGLRegionPtr pRegion, LPCTSTR szFileName);
	static 	void GetExampleSplines(CPGLRegionPtr pRegion);
	static 	void GetExamplePie(CPGLRegionPtr pRegion);
	static 	void GetExampleLineInterpolation(CPGLRegionPtr pRegion);
	static 	void GetExampleContainer(CPGLRegionPtr pRegion);
	static 	void GetExampleScatter(CPGLRegionPtr pRegion);
	static 	void GetExampleStock(CPGLRegionPtr pRegion);
	static 	void GetExampleMaps(CPGLRegionPtr pRegion);
	static 	void GetExampleStackedLines(CPGLRegionPtr pRegion);
	static 	void GetExampleStackedLines2(CPGLRegionPtr pRegion);
	static 	void GetExampleSubplot(CPGLRegionPtr pRegion);
	static 	void GetExampleTimeLabel(CPGLRegionPtr pRegion);
	static 	void GetExampleAxis(CPGLRegionPtr pRegion);
	static 	void GetExampleLineLOD(CPGLRegionPtr pRegion);
	static 	void GetExampleSimpleLine(CPGLRegionPtr pRegion);
	static 	void GetExampleDashing(CPGLRegionPtr pRegion);
	static 	void GetExampleClosing(CPGLRegionPtr pRegion);
	static void GetExampleTextAnnotations(CPGLRegionPtr pRegion);
	static void GetExampleSickData(CPGLRegionPtr pRegion);
	static CPGLRegionPtr CPGLDemo::RenderExample( LPCTSTR szDemo);
	static void TestCAPI();


	typedef struct std::pair<double, int> PairDIDef;
	typedef std::vector<PairDIDef> VectorPairDIDef;
	static VectorPairDIDef m_vPairs;
   //std::vector<PairDIDef> m_vPairs;

	//! generate all examples
	void GetAllExamples( CPGLArchive::EFileFormat eFileFormat, const CPGLPointU& dim = CPGLPointU(640,480));
	//! Test output types	
	void GetArchiveDemo( LPCTSTR szFileName );
	HRESULT GetEmfToIStreamDemo(LPCTSTR szFileName);


	//! Threading
	static UINT ThreadProc( LPVOID pParam );
	void Threading();
};

float TestFunctionForFcnData( float f);
float DummyFieldFcn( float x, float y);
